<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:include page="../core.jsp" />
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>hhqk--首页</title>
<link rel="stylesheet" type="text/css"
    href="${staticPath}/static/js/jquery-easyui-1.3.3/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"
    href="${staticPath}/static/js/jquery-easyui-1.3.3/themes/icon.css">
<script type="text/javascript"
    src="${staticPath}/static/js/jquery-easyui-1.3.3/jquery.min.js"></script>
<script type="text/javascript"
    src="${staticPath}/static/js/jquery-easyui-1.3.3/jquery.easyui.min.js"></script>
<script type="text/javascript"
    src="${staticPath}/static/js/jquery-easyui-1.3.3/locale/easyui-lang-zh_CN.js"></script>

</head>

<body class="easyui-layout">
	<!-- top -->
	<div region="north" title="欢迎加入肯打鸡豪华套餐" border="true" split="true" style="overflow:hidden;height:80px;">
		<div style="background-color:#d8e4fe;height:80px">
			<div style="display:inline">
				<span style="font-size:28px;">肯打鸡豪华套餐</span>
			</div>
			<div style="display:inline">
				<span><a href="/" class="easyui-linkbutton" plain="true" iconCls="icon-blank" target="_blank">基础功能</a></span>
			</div>
			<div style="display:inline">
				<span><a href="/" class="easyui-linkbutton" plain="true" iconCls="icon-cvs" target="_blank">扩展模块</a></span>
			</div>
			<div style="display:inline">
				<span><a href="/" class="easyui-linkbutton" plain="true" iconCls="icon-cvs" target="_blank">商品模块</a></span>
			</div>
			<div style="display:inline">
				<span><a href="/" class="easyui-linkbutton" plain="true" iconCls="icon-cvs" target="_blank">会员模块</a></span>
			</div>
			<div style="display:inline">
				<span><a href="/" class="easyui-linkbutton" plain="true" iconCls="icon-cvs" target="_blank">配置模块</a></span>
			</div>
			<div style="display:inline">
				<span><a href="/" class="easyui-linkbutton" plain="true" iconCls="icon-cvs" target="_blank">接口模块</a></span>
			</div>
			<div style="display:inline">
				<span><a href="/" class="easyui-linkbutton" plain="true" iconCls="icon-cvs" target="_blank">jar/war</a></span>
			</div>
		</div>
	</div>
    <!-- foot -->
    <div region="south" border="true" split="true" style="overflow:hidden;height:30px;">
		<div style="width:100%;text-align:center;line-height:25px;">版权不存在的!</div>
	</div>
    <!-- left  -->
    <div region="west" split="true" title="导航菜单" style="width:200px;">
		<div id="aa" class="easyui-accordion" style="position: absolute; top: 27px; left: 0px; right: 0px; bottom: 0px;">
            <div title="用户管理" iconcls="icon-save" selected="true" style="overflow: auto; padding: 10px;">
                <ul class="easyui-tree">
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/main">用户信息</a></span>
                  </li>
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">角色信息</a></span>
                   </li>
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">权限信息</a></span>
                   </li>
                    <li>
                        <span><a target="mainFrame" href="${ctx}/user/findAll">用户信息</a></span>
                    </li>
                </ul>
            </div>
            <div title="新闻管理" iconcls="icon-reload" style="padding: 10px;">
                <ul class="easyui-tree">
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">用户信息</a></span>
                  </li>
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">角色信息</a></span>
                   </li>
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">权限信息</a></span>
                   </li>
                    <li>
                        <span><a target="mainFrame" href="${ctx}/user/findAll">用户信息</a></span>
                    </li>
                </ul>
            </div>
            <div title="资源管理">
                <ul class="easyui-tree">
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">用户信息</a></span>
                  </li>
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">角色信息</a></span>
                   </li>
                   <li>
                       <span><a target="mainFrame" href="${ctx}/user/findAll">权限信息</a></span>
                   </li>
                    <li>
                        <span><a target="mainFrame" href="${ctx}/user/findAll">用户信息</a></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
	</div>
    <!-- main  -->
    <div id="mainPanle" region="center" style="overflow:hidden;">
    	<!-- 可以再添加一个左侧导航栏 -->
    	<!-- <div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'west',collapsed:true" style="width:180px"></div>
			<div data-options="region:'center'"> easyui-tabs </div>
		</div> -->
    	<div id="tabs" class="easyui-tabs" fit="true" border="false">
            <div title="欢迎使用" style="padding: 20px; overflow: hidden;" id="home">
                <h1>Welcome to jQuery UI!</h1>
            </div>
        </div>
	</div>

<!-- 按钮事件 -->
<script language="JavaScript">
        $(document).ready(function () {
            $('.easyui-accordion li a').click(function () {   //1、点击 li 下 的 a 标签，读取 a标签的链接进行处理
                var tabTitle = $(this).text();
                var url = $(this).attr("href");
                addTab(tabTitle, url);                        //2、增加 内容 框 事件
                $('.easyui-accordion li div').removeClass("selected");
                $(this).parent().addClass("selected");
            }).hover(function () {
                $(this).parent().addClass("hover");
            }, function () {
                $(this).parent().removeClass("hover");
            });

            function addTab(subtitle, url) {
                if (!$('#tabs').tabs('exists', subtitle)) {
                    $('#tabs').tabs('add', {
                        title: subtitle,
                        content: createFrame(url),        //3、 根据 url 创建 内容框
                        closable: true,
                        width: $('#mainPanle').width() - 10,
                        height: $('#mainPanle').height() - 26
                    });
                } else {
                    $('#tabs').tabs('select', subtitle);
               }
                tabClose();
            }


            function createFrame(url) {
                var s = '<iframe name="mainFrame" scrolling="auto" frameborder="0"  src="' + url + '" style="width:100%;height:100%;"></iframe>';
                return s;
            }


            function tabClose() {
                /*双击关闭TAB选项卡*/
                $(".tabs-inner").dblclick(function () {
                    var subtitle = $(this).children("span").text();
                    $('#tabs').tabs('close', subtitle);
                })

                $(".tabs-inner").bind('contextmenu', function (e) {
                    $('#mm').menu('show', {
                        left: e.pageX,
                        top: e.pageY,
                    });
                    var subtitle = $(this).children("span").text();
                    $('#mm').data("currtab", subtitle);
                    return false;
                });
            }
        });
 </script> 
</body>
</html>